﻿@{
    Layout = null;
}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>17商城</title>
<link type="text/css" href="~/css/css.css" rel="stylesheet" />
<link href="~/layui/css/layui.css" rel="stylesheet" />

</head>

<body style=" background:#FFF;">
 <div class="loginLogo">
  <div class="logoMid">
   <h1 class="logo" style="height:71px;padding-top:10px;"><img src="/images/loginLogo.jpg" width="241" height="71" /></a></h1>
   <div class="loginReg">
        <a href="/home/index" style="font-size:25px;position:absolute;margin-left:-1050px;margin-top:-50px">《返回首页</a>
    还没有会员账号?&nbsp;<a href="/login/zhuce">免费注册</a>
   </div><!--loginReg/-->
  </div><!--logoMid/-->
 </div><!--loginLogo/-->
 <div class="loginBox">
    
  <div class="loginLeft">
      
   <img src="/images/logoinimg.jpg" width="716" height="376" />
  
  </div><!--loginLeft/-->
  <form   method="post" class="loginRight layui-form">
   <h2>用户登录</h2>
   <h3>用户名</h3>
     <input type="text" name="UserName" lay-verify="title" autocomplete="off" placeholder="请输入用户名" class="layui-input">
   <h3>密码</h3>
    <input type="password" name="UserPwd" lay-verify="required" lay-reqtext="用户名是必填项，岂能为空？" placeholder="请输入密码" autocomplete="off" class="layui-input">
   <div class="subs" style="width:300px;margin-top:25px">
     
    <button type="submit" class="layui-btn layui-btn-fluid"  lay-submit="" lay-filter="loginForm">登录</button>
   </div>
  </form><!--loginRight/-->
  <div class="clears"></div>
 </div><!--loginBox/-->
<script src="~/layui/layui.js"></script>
 <script type="text/javascript" src="~/js/jquery.js"></script>
<script type="text/javascript" src="~/js/js.js"></script>
<script>
       layui.use(["form", 'layer'], function () {
            var form = layui.form;
            var $ = layui.$;
            var layer = layui.layer;
            //提交
            form.on('submit(loginForm)', function (data) {

                $.post("/login/index", data.field, function (res) {
                    if (res.isSuccess) {
                        layer.msg(res.msg, function () {
                            window.location.href = "/home/index";
                        });
                    } else {
                        layer.msg(res.msg);
                    }
                });
                return false;
            });
        })
 </script>
</body>
</html>
